home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / tcl / RecordEval.man < prev    next >
Encoding:
Text File  |  1991-10-10  |  2.7 KB  |  67 lines

  1.  
  2.  
  3.  
  4. Tcl_RecordAndEval     C Library Procedures      Tcl_RecordAndEval
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      Tcl_RecordAndEval - save a Tcl command in the history list,
  12.      then execute it
  13.  
  14. SSYYNNOOPPSSIISS
  15.      ##iinncclluuddee <<ttccll..hh>>
  16.  
  17.      int
  18.      TTccll__RReeccoorrddAAnnddEEvvaall(_i_n_t_e_r_p, _c_m_d, _f_l_a_g_s)
  19.  
  20. AARRGGUUMMEENNTTSS
  21.      Tcl_Interp   *_i_n_t_e_r_p    (in)      Interpreter in which to
  22.                                        record and execute the
  23.                                        command.
  24.  
  25.      char         *_c_m_d       (in)      Command (or sequence of
  26.                                        commands) to execute.
  27.  
  28.      char         _f_l_a_g_s      (in)      Flags to pass to TTccll__EEvvaall
  29.                                        (normally 0).  If -1, then
  30.                                        the command is not exe-
  31.                                        cuted;  it's just
  32.                                        recorded.
  33. _________________________________________________________________
  34.  
  35.  
  36. DDEESSCCRRIIPPTTIIOONN
  37.      TTccll__RReeccoorrddAAnnddEEvvaall is invoked to record a command on the his-
  38.      tory list and then execute it.  Programs that do not wish to
  39.      use the history mechanism should not call TTccll__RReeccoorrddAAnnddEEvvaall;
  40.      they should call TTccll__EEvvaall instead.  Furthermore,
  41.      TTccll__RReeccoorrddAAnnddEEvvaall should only be called with top-level com-
  42.      mands typed by the user, since the purpose of history is to
  43.      allow the user to re-issue recently-invoked commands.
  44.  
  45.      This procedure does three things.  First, it initializes
  46.      history for the interpreter _i_n_t_e_r_p, if this is the first
  47.      call for _i_n_t_e_r_p.  Among other things, this makes the hhiissttoorryy
  48.      command available in _i_n_t_e_r_p.  If TTccll__RReeccoorrddAAnnddEEvvaall isn't
  49.      called for an interpreter then there will be no hhiissttoorryy com-
  50.      mand in that interpreter.  Second, TTccll__RReeccoorrddAAnnddEEvvaall saves
  51.      _c_o_m_m_a_n_d in the history list for iinntteerrpp, making a new event
  52.      to hold the command.  Third, TTccll__RReeccoorrddAAnnddEEvvaall executes the
  53.      command by passing it and _f_l_a_g_s to TTccll__EEvvaall.  If _f_l_a_g_s is -1
  54.      then only the first two steps are taken;  the command will
  55.      not be executed.
  56.  
  57.  
  58. KKEEYYWWOORRDDSS
  59.      command, event, execute, history, interpreter, record
  60.  
  61.  
  62.  
  63. Sprite v1.0                                                     1
  64.  
  65.  
  66.  
  67.